from lxml import etree
import requests

response = requests.get("https://www.baidu.com/")

content = response.content.decode("utf-8")

html = etree.HTML(content)
print(html) # <Element html at 0x217b815a2c0>
print(type(html))   # <class 'lxml.etree._Element'>

result = html.xpath("//div")